<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head>
  <title>PHP AJAX Code Tester</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <style type="text/css">
    * {font-family: Georgia, 'New York CE', utopia, serif;}
    body {overflow: scroll}
    #loading {display: none; position: absolute; top: 0px; left: 0px; padding: 5px;
              background-color: red; color: white}
    #center {text-align: center}
    fieldset {display: inline;}
    textarea {width: 96%; border-top: 2px solid #777; border-left: 2px solid #BBB;
              border-right: 1px solid #CCC; border-bottom: 1px solid #CCC; padding: 10px}
    button {background-color: green; padding: 5px; color: white; font-style: italic}
    button:hover {background-color: black}
    #output pre {font: 0.7em/1.6em 'Lucida Console', 'Monaco CE', fixed, monospace;}
    #footer {font: 0.8em "Century Gothic","Lucida Grande","Lucida Sans Unicode",Verdana,Helvetica,Arial,sans-serif;
             position: fixed; bottom: 0px; right: 55px; padding: 11px}
    #footer:hover {border: 1px solid black; background-color: #DFDFDF; padding: 10px}
    #footer a {text-decoration: none; font: inherit; font-weight: bold; padding: 5px; padding-top: 0; border-top: 2px solid black;}
    #footer a:visited {color: black}
    /*#footer a:hover {background-color: black; color: white}*/
  </style>
  <script type="text/javascript" src="jquery-1.2.6.js"></script>
  <script type="text/javascript" src="jquery.autogrow.js"></script>
  <script type="text/javascript">
  <![CDATA[ 
    $(document).ready(
      function()      
      {
        $('textarea').autogrow({maxHeight: 600}).focus();
        $('#loading').ajaxStart(
          function()
          {
            $(this).show();    
          }
        );
        $('#loading').ajaxStop(
          function()
          {
            $(this).hide();  
          }
        );
        $('form button').click(
          function()
          {
            $.post('eval.php', {script: $('textarea').val()},
              function(data) 
              {
                $('#output').text(data);
                if ($('#pre-wrap').attr('checked'))
                {
                  $('#output').wrapInner('<pre></pre>');
                }
              }
            );
            return false;
          }
        );
      }
    );
  ]]>
  </script>
</head>
<body>
  <div id="center">
    <div id="loading">Zpracovávám...</div>
      <form method="post" action="index.php">
        <p><textarea rows="30" cols="50"></textarea></p>
        <fieldset>
        <legend>Možnosti</legend>
        <input type="checkbox" id="pre-wrap" name="pre-wrap" checked="checked" /><label for="pre-wrap">Obalit výstup do tagu &lt;PRE&gt;</label>
        <!-- <input type="checkbox" id="pre-wrap" name="pre-wrap" checked="checked" /><label for="pre-wrap">Zobrazit dobu zpracování</label> -->
        </fieldset>
        <p><button>Otestovat!</button></p>
      </form>
  </div>
  <div id="output">
  </div>
  <div id="footer">
    <a href="http://code.google.com/p/codetester/">PHP AJAX Code Tester</a><br />[ Revision 5 ] 25.6.2008
  </div> 
</body>
</html>